package graphic;

import javax.swing.SwingWorker;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import openGL11.Engine;
import klient.Klient;
import objects.LoadingAnim;
/**
 *  
 * @author Marcin & Bartek
 * 
 * @description Initialize loops
 */
public class Graphic{
    public static Engine e;
    public static MainMenuLoop mml;
    
    public int width=800;
    public int height=600;
    
    public void run() throws Exception {
        DisplayInit.SetResolution(width, height, false);
        Display.setTitle("MTD");
        try{
            Display.create();
        }catch(LWJGLException e) {
           Klient.log("Nie udało się zainicjalizować grafiki");
        }
        //preinit
        LoadingAnim.init();
        //end preinit
        e = new Engine(width, height);
        mml = new MainMenuLoop(e);
        new Loop(e);
    }
}
